// eslint-disable-next-line no-shadow
export function search({ pg, search } = {}) {
  return RSocket.rs({
    route: 'cbv.global.notice',
    args: {
      pg: { ...pg },
      search: {
        ...search,
      },
    },
  });
}

// eslint-disable-next-line no-shadow
export function count({ search }) {
  return RSocket.rr({
    route: 'cbv.global.notice.count',
    args: {
      search: {
        ...search,
      },
    },
  });
}

export function get(id) {
  return RSocket.rr({
    route: `cbv.global.notice.${id}`,
  });
}

export function remove(id) {
  return RSocket.rr({
    route: `cbv.global.notice.${id}.delete`,
  });
}

export function create(data) {
  return RSocket.rr({
    route: 'cbv.global.notice.create',
    data: {
      ...data,
    },
  });
}

export function update(data) {
  return RSocket.rr({
    route: 'cbv.global.notice.update',
    data: {
      ...data,
    },
  });
}

export function getActivitys(data) {
  return RSocket.rs({
    route: 'biz.activities',
    args: { search: { ...data }, pg: { size: 99 } },
  });
}
